function [fluor_area, fluor_total] = FRAP_lsm_load_fluor_data(filename)
%% Import data from text file
% Script for importing data from the following text file:
%
%    filename: /Users/bknapp/Documents/FRAP_Data/221102_mitotracker_FRAP/bw25113_pad_1/imagej_outputs/FRAP_mitotracker_bw25113_200ms_4_cropped_ROI_cap.csv
%
% Auto-generated by MATLAB on 04-Nov-2022 16:06:05

%% Setup the Import Options and import the data
opts = delimitedTextImportOptions("NumVariables", 5);

% Specify range and delimiter
opts.DataLines = [2, Inf];
opts.Delimiter = ",";

% Specify column names and types
opts.VariableNames = ["Var1", "Area", "Mean", "Var4", "Var5"];
opts.SelectedVariableNames = ["Area", "Mean"];
opts.VariableTypes = ["string", "double", "double", "string", "string"];

% Specify file level properties
opts.ExtraColumnsRule = "ignore";
opts.EmptyLineRule = "read";

% Specify variable properties
opts = setvaropts(opts, ["Var1", "Var4", "Var5"], "WhitespaceRule", "preserve");
opts = setvaropts(opts, ["Var1", "Var4", "Var5"], "EmptyFieldRule", "auto");

% Import the data
tbl = readtable(filename, opts);

%% Convert to output type
fluor_area = tbl.Area;
Mean = tbl.Mean;
fluor_total = Mean.*fluor_area;
%% Clear temporary variables
clear opts tbl